package com.caterina.components;

import javax.swing.JLabel;
import com.caterina.resources.CColors;
import com.caterina.resources.CFont;

public class CLabel extends JLabel{
	public CLabel(String text){
		super(text);
		this.setLabelType(LabelType.STANDARD);
	}
	public CLabel(String text,LabelType type){
		this(text);
		this.setLabelType(type);
	}
	public void setLabelType(LabelType type){
		this.labelType=type;
		switch(labelType){
			case H1:{
				this.setFont(CFont.CLABEL_H1);
				this.setForeground(CColors.LABEL_H1_FOREGROUND);
				break;
			}
			case H2:{
				this.setFont(CFont.CLABEL_H2);
				this.setForeground(CColors.LABEL_H2_FOREGROUND);
				break;
			}
			case PLANE_TEXT:{
				this.setFont(CFont.CLABEL_PLAIN);
				this.setForeground(CColors.LABEL_PLANE_FOREGROUND);
				break;
			}
			case STANDARD:{
				this.setFont(CFont.CLABEL_FONT);
				this.setForeground(CColors.LABEL_FOREGROUND);
				break;
			}
			case HIGHLIGHT_STANDARD:{
				this.setFont(CFont.CLABEL_HL_STANDARD);
				this.setForeground(CColors.LABEL_PLANE_FOREGROUND);
				break;
			}
			default:{
				this.setFont(CFont.CLABEL_FONT);
				this.setForeground(CColors.LABEL_FOREGROUND);
				break;
			}
		}
	}
	private LabelType labelType;
	public enum LabelType{
	H1,
	H2,
	PLANE_TEXT,
	STANDARD,
	HIGHLIGHT_PLANE,
	HIGHLIGHT_STANDARD}
	private static final long serialVersionUID = 1L;
}
